<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>在线考试:登录</title>
    <link rel="stylesheet" href="js/bower_components/bootstrap/dist/css/bootstrap.min.css">
    <script src="js/bower_components/jquery/dist/jquery.min.js"></script>
    <script src="js/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
    <script>
        $(function () {
            $("#btnLogin").click(function () {
                param='{"page": 0, "pageSize": 3}'
                $.ajax({
                    type:"GET",
                    url:"http://localhost:8088/getQuestionBankWhereAll",
                    data:param,
                    dataType:"json",
                    contentType:"application/jsonp;charset=utf-8",
                    success:function(data){
                        alert(data.username);
                        location.href="html/index.html";
                    },
                    error:function(data){
                        console.log()(data.data.list)
                    }
                });


            });
            $("#btnClear").click(function () {
                $("#txtAccount").val("");
                $("#txtPwd").val("");
            });
        });
    </script>

</head>
<body>
    <div class="container">
        <div class="row col-md-12">
            <div class="col-md-3"></div>
            <div class="col-md-6">
                <div class="panel panel-primary" style="margin-top: 150px;">
                    <div class="panel-heading"><strong>在线考试管理系统</strong></div>
                    <div class="panel-body" >
                        <div class="input-group">
                            <span class="input-group-addon" id="basic-addon1">
                                <span class="glyphicon glyphicon-user"></span>
                            </span>
                            <input id="txtAccount" type="text" class="form-control"
                                   placeholder="账户" >
                        </div>
                        <br>
                        <div class="input-group">
                            <span class="input-group-addon" id="basic-addon2">
                                <span class="glyphicon glyphicon-lock"></span>
                            </span>
                            <input id="txtPwd" type="password" class="form-control"
                                   placeholder="密码" >
                        </div>
                        <br>
                        <div class="btn-group-lg text-right">
                            <button id="btnLogin" type="button" class="btn btn-success">登录</button>
                            <button id="btnClear" type="button" class="btn btn-danger">清空</button>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-md-3"></div>
        </div>
    </div>
</body>
</html>